G_GNUC_END_IGNORE_DEPRECATIONS
}
+static gboolean
+gtk_css_widget_node_should_create_transitions (GtkCssWidgetNode *widget_node,
+ GtkCssStyle *previous_style)
+{
+ GtkWidget *widget;
+ gboolean animate;
+
+ widget = widget_node->widget;
+ if (widget == NULL)
+ return FALSE;
+
+ if (!gtk_widget_get_mapped (widget))
+ return FALSE;
+
+ if (previous_style == gtk_css_static_style_get_default ())
+ return FALSE;
+
+ g_object_get (gtk_widget_get_settings (widget),
+ "gtk-enable-animations", &animate,
+ NULL);
+
+ return animate;
+}
+
static gboolean
gtk_css_static_style_needs_revalidate (GtkCssStaticStyle *style,
GtkCssChange change)
parent ? gtk_css_node_get_style (parent) : NULL,
timestamp,
gtk_css_node_get_style_provider (node),
- gtk_style_context_should_create_transitions (context, style) ? style : NULL);
+ gtk_css_widget_node_should_create_transitions (widget_node, style) ? style : NULL);
g_object_unref (new_static_style);
}
priv->invalidating_context = NULL;
}
-gboolean
-gtk_style_context_should_create_transitions (GtkStyleContext *context,
- GtkCssStyle *previous_style)
-{
- GtkStyleContextPrivate *priv;
- GtkWidget *widget;
- gboolean animate;
-
- priv = context->priv;
-
- if (GTK_IS_CSS_WIDGET_NODE (priv->cssnode))
- return FALSE;
-
- widget = gtk_css_widget_node_get_widget (GTK_CSS_WIDGET_NODE (priv->cssnode));
- if (widget == NULL)
- return FALSE;
-
- if (!gtk_widget_get_mapped (widget))
- return FALSE;
-
- if (previous_style == gtk_css_static_style_get_default ())
- return FALSE;
-
- g_object_get (gtk_widget_get_settings (widget),
- "gtk-enable-animations", &animate,
- NULL);
-
- return animate;
-}
-
void
gtk_style_context_validate (GtkStyleContext *context,
const GtkBitmask *changes)
const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *context,
GType widget_type,
GParamSpec *pspec);
-gboolean gtk_style_context_should_create_transitions (GtkStyleContext *context,
- GtkCssStyle *previous_style);
void gtk_style_context_validate (GtkStyleContext *context,
const GtkBitmask*changes);
gboolean _gtk_style_context_check_region_name (const gchar *str);